<!DOCTYPE html>
<html lang="en">
<head>
[#include "/customer/include/static.htm"]
    <link href="${path}/resources/css/user.css" rel="stylesheet" type="text/css" />

    <link href="${path}/resources/plug/layui/css/layui.css" rel="stylesheet" type="text/css"/>
    <script src="${path}/resources/plug/layui/layui.js" type="text/javascript"></script>
</head>
<body>
<!--头部-->
[#include "/customer/include/header.ftl"]
<div class="member">
    <!--左边-->
[#include "/customer/include/member_left_menu.ftl"]
    <!--左边 end-->
    <div class="memberRight">
        <div class="member_tab">
            <div class="member_tab">
                <a href="/member/account/log">资金明细</a>
                <a   href="/member/account/edit">银行账户</a>
               [#--<a  href="/member/account/go_recharge_offline">线下充值</a>--]
                <a  href="/member/account/go_recharge_online">线上充值</a>
                <a href="/member/account/recharges">充值记录</a>
                <a  class="on" href="/member/account/gocash">用户提现</a>
                <a href="/member/account/withdrawals">提现记录</a>

            </div>
        </div>
        <div class="member_tab_info">
            <!--账户充值 start-->
            <form class="layui-form">

                <table class="layui-table ">
                    <tbody>

                    <tr >
                        <td>提现银行：</td>
                        <td>
                            <div class="layui-input-inline"  style="width: 350px">
                            ${bank.bank}${bank.bank_cardno}
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>可用余额：</td>
                        <td>
                            ￥${account.balance}
                        </td>
                    </tr>
                    <tr>
                        <td>提现金额：</td>
                        <td>
                            <input class="layui-input" type="text" lay-verify="required" name="money" maxlength="20" >
                        </td>
                    </tr>
                    [#include "/customer/include/token.ftl"]
                    <tr>
                        <td>验 证 码：</td>
                        <td>
                            <input style="margin-left:5px;width: 100px;" lay-verify="required" name="captcha" type="text" maxlength="4">
                            <a href="javascript:void(0);" onclick="$('#randImage').click()">
                                <img name="randImage" id="randImage" src="${path}/common/random" onclick="this.src = '/common/random?' + Math.random();" width="80" height="30">
                            </a>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <button  style="background-color: #F3485A;" lay-submit lay-filter="MainForm" class="layui-btn" style="width: 280px;margin-top:3px;">确 认 提 现</button>

                        </td>
                    </tr>
                    </tbody>
                </table>
                <!--账户充值 end--></form></div>
    </div>
</div>
<script>
    layui.use(['form','layer'], function(){
        var form = layui.form(), $=layui.jquery, layer = layui.layer;
        form.on('submit(MainForm)', function(data){
            layer.confirm("您确认提交提现申请吗？",function(){
                var index = layer.load();
                ajax({
                    url:"${path}/member/account/docash",
                    data: data.field,
                    success: function(result){
                        if (result.type == "success") {
                            layer.msg("提现申请成功",function(){
                                window.location.href="${path}/member/account/log";
                            });
                        } else {
                            layer.msg(result.content,{icon:2});
                        }
                        layer.close(index);
                    },
                    complete:function(){
                        layer.close(index);
                    },error:function(){
                        layer.closeAll();
                    }
                });
            });
            return false;
        });
    });
</script>
[#include "/customer/include/footer.ftl"]
</body>
</html>